/*
 * Auto.cpp
 *
 *  Created on: Mar 19, 2012
 *      Author: s147614
 */

#include "Auto.h"

Auto::Auto(Richting richting, char* type) :
	Thread(type) {
	Auto::richting = richting;
}

void Auto::run() {
	mRichting->lock();

	cRichting->wait(mRichting);
	cout << type << " wacht" << endl;

	msleep(10);

	cPasseerd->signal();
	cout << type << " is gepasseerd" << endl;

	mRichting->unlock();
}
